extends layout
block css
  link(rel='stylesheet', href='assets/css/wrapper-main.css')
  link(rel='stylesheet', href='assets/css/header.css')
  link(rel='stylesheet', href='assets/css/sidebar.css')
  link(rel='stylesheet', href='assets/css/menu.css')
  link(rel='stylesheet',href='assets/css/iframe.css')
block main
  include header
  // Wrapper
  #wrapper-main(ng-app='index',ng-controller='posts')
    div#loading.animated(ng-class='{true:"fadeOut",false:""}[isShow]')
      include loading
    // Main
    #main-main
      // Post
      article.post(ng-if='posts.length===0')
        h2 啊哦，没有获取成功，再试一次吧
      article.post(ng-repeat='post in posts')
        header
          .title
            h2
              a(href='{{post.url}}') {{post.title}}
          //-   p 这是测试这是测试这是测试这是测试
          .meta
            time.published(datetime='2015-11-01') {{post.time}}
            a.author(href='#')
              span.name ZSK
              img(src='images/avatar.jpg', alt='')
        p
          | {{post.simIntro}}
        footer
          ul.actions
            li
              a.button.big(ng-click='readInner(post.url)') 阅读全文
          ul.stats
            li
              a(href='#') General
            li
              a.icon.fa-heart(href='#') {{post.loveNum}}
            li
              a.icon.fa-comment(href='#') {{commentsNumForAId[post.articleId] || 0}}
      // Pagination
      ul.actions.pagination
        li
          a.disabled.button.big.previous(id='prev',href='#',ng-click='changePage("prev")') Previous Page
        li
          a.button.big.next(id='next',href='#',ng-click='changePage("next")') Next Page
    // Sidebar
    section#sidebar
      // Intro
      section#intro
        a.logo(href='#')
          img(src='images/avatar.jpg', alt='')
        header
          h2 Flaying Further
          p
            | Never say never and Never give up

      // Mini Posts
      //section
      //  .mini-posts
      //    // Mini Post
      //    article.mini-post()
      //      header
      //        h3
      //          a(href='#') {{post.title}}
      //        time.published(datetime='2015-10-20') {{post.time}}
      //        a.author(href='#')
      //          img(src='images/avatar.jpg', alt='')
      //      a.image(href='#')
      //        img(src='images/pic04.jpg', alt='')
      // Posts List
      section#hot-posts
        h2 hot posts
        ul.posts
          li(ng-repeat="post in posts | filter:fnFilterHot | orderBy:'commentNum'")
            article
              header
                h3
                  a(href='#') {{post.title}}
                time.published(datetime='2015-10-20') {{post.time}}
              a.image(href='#')
                img(src='images/pic08.jpg', alt='')
          li(ng-if='hotNum===0')
            h3 啊哦，还没有热门文章哦，大家快去推荐吧
      // About
      section.blurb
        h2 About
        p
          | 作为一名国立污汉停水断电大学的一名学生，生活实属不易，所以大家还是多多关注我的网站吧
        ul.actions
          li
            a.button(href='/about') Learn More
      // Footer
      section#footer
        ul.icons
          li
            a.fa-twitter(href='#')
              span.label Twitter
          li
            a.fa-facebook(href='#')
              span.label Facebook
          li
            a.fa-instagram(href='#')
              span.label Instagram
          li
            a.fa-rss(href='#')
              span.label RSS
          li
            a.fa-envelope(href='#')
              span.label Email
        p.copyright
          | &copy; ZSKBlog.
          br
          |(感谢页面模板设计)Design:
          a(href='http://html5up.net',target='_blank') HTML5 UP
          | . Images:
          a(href='http://unsplash.com',target='_blank') Unsplash
          | .
    #cover-iframe.animated(ng-show='showCoverIframe')
      ul#btns
        li
          a.btn#share(href='{{choosePostUrl}}') 分享
        li#close-li
          a.btn#close(ng-click='closeIframe()') 关闭
      #iframe-wrapper.resized.animated
        iframe(id='iframe-main' src='')


block js
  // Scripts
  script(src='assets/js/jquery.min.js')
  //script(src='assets/js/angular.js')
  script(src='assets/js/skel.min.js')
  script(src='assets/js/util.js')
  //if lte IE 8
    script(src='assets/js/ie/respond.min.js')
  script(src='assets/js/main.js')
  script(src='assets/js/index.js')
  script(src='assets/js/search.js')

